//
//  PublicTimerDispalyCell.m
//  yqApp
//
//  Created by dqb on 15/10/15.
//  Copyright © 2015年 yq. All rights reserved.
//

#import "APPublicTimerDispalyCell.h"

@interface APPublicTimerDispalyCell ()

@end

@implementation APPublicTimerDispalyCell

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        UIImageView *imageView = [[UIImageView alloc] init];
        imageView.contentMode = UIViewContentModeScaleAspectFill;
        imageView.layer.masksToBounds = YES;
        self.imgView = imageView;
        [self.contentView addSubview:imageView];
        [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.contentView);
        }];
        
        _coverView = [[UIView alloc] init];
        [_coverView setGradientBackgroundWithColors:@[LYRGBAColor(0, 0, 0, 0.5),LYRGBAColor(0, 0, 0, 0)] locations:@[@0,@1] startPoint:CGPointMake(0.5, 0) endPoint:CGPointMake(0.5, 1)];
        [self.contentView addSubview:_coverView];
        [_coverView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.equalTo(self.contentView);
            make.height.mas_equalTo(115);
        }];
      
    }
    return self;
}
- (void)layoutSubviews{
    [super layoutSubviews];
    self.imgView.frame = self.bounds;
}

@end
